import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router);

const test = (resolve) => {
  import('../views/test/test').then((module) => {
    resolve(module)
  })
};

const home = (resolve) => {
  import('../views/home/home').then((module) => {
    resolve(module)
  })
};

const market = (resolve) => {
  import('../views/market/market').then((module) => {
    resolve(module)
  })
};

const goods = (resolve) => {
  import('../views/goods-list/goods-list').then((module) => {
    resolve(module)
  })
};


export default new Router({
  linkActiveClass: 'active',
  routes: [
    {
      path: '/',
      redirect: '/home'
    },
    {
      path: '/test',
      component: test
    },
    {
      path: '/home',
      component: home
    },
    {
      path: '/market',
      component: market
    }
  ]
});